
import Vue from 'vue'
import App from 'app/App'
import router from 'app/router/routerConfig'
import { createStore } from 'app/store/store.js'
import {sync} from 'vuex-router-sync'


export function createApp(){
	//创建router实例
	const store = createStore()
	
	sync(store,router)
	
	//创建Vue实例
	const app = new Vue({
		router,
		store,
		render:h=>h(App)
	})
	
	return {app, router, store}
}
